package com.dome.service;

import com.dome.config.MyDateSources;
import com.dome.dao.ResourceAuthorityDao;
import com.dome.dao.RoleDao;
import com.dome.model.ResourceAuthority;
import com.dome.model.Role;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ResourceAuthorityService {
	@Autowired
	ResourceAuthorityDao resourceAuthorityDao;
	@MyDateSources(data="1")
	public void deleteResourceAuthorityWH(List<Role> rolseList) {
		resourceAuthorityDao.deleteResourceAuthorityWH(rolseList);
	}
	@MyDateSources(data="1")
	public void insertResourceAuthorityWH(List<ResourceAuthority> resourceAuthoritiesBJ) {
		resourceAuthorityDao.insertResourceAuthorityWH(resourceAuthoritiesBJ);
	}
	@MyDateSources(data="1")
	public List<ResourceAuthority> getWH(List<Role> rolseList) {
		return resourceAuthorityDao.selectResourceAuthority(rolseList);
	}
	@MyDateSources(data="2")
	public List<ResourceAuthority> getBJ(List<Role> rolseList) {
		return resourceAuthorityDao.selectResourceAuthority(rolseList);
	}
}
